import 'package:efood_multivendor/util/dimensions.dart';
import 'package:flutter/material.dart';

class CustomLoader extends StatelessWidget {
  final Color? bgColor;
  const CustomLoader({Key? key, this.bgColor}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Center(
        child: Container(
      height: 100,
      width: 100,
      decoration: BoxDecoration(
          color: bgColor ?? Theme.of(context).cardColor,
          borderRadius: BorderRadius.circular(Dimensions.RADIUS_SMALL)),
      alignment: Alignment.center,
      child: CircularProgressIndicator.adaptive(
        backgroundColor: Theme.of(context).colorScheme.secondary,
      ),
    ));
  }
}
